package com.junit;

import java.util.Date;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.sjzl.dao.impl.DaoImpl;
import com.sjzl.entity.Post;
import com.sjzl.entity.User;


public class PostTest {
	@Test
	public void main(){
		ApplicationContext ac = new ClassPathXmlApplicationContext(
				new String[] { "applicationContext.xml" });
		DaoImpl dao = (DaoImpl) ac.getBean("daoImpl");
		
		/*Post post = (Post) dao.get(Post.class, 41);
		System.out.println(post.getName());
		
		Board board = (Board) dao.get(Board.class, 6);
		board.setLastPost(null);
		dao.update(board);
		Board board = post.getBoard();
		System.out.println(board.getName());*/
		
		
		
	}
}
